package com.sopaths.contract.domain;

public enum LoginType {
	LOCAL(0),
	QQ(1),
	WEIBO(2);

	private int value;

	LoginType(int value) {
		this.value = value;
	}

	public int value() {
		return this.value;
	}

	public LoginType parse(int value) {
		for (LoginType loginType : LoginType.values()) {
			if (loginType.value() == value) {
				return loginType;
			}
		}
		throw new IllegalArgumentException("Unknown LoginType. Value: " + value);
	}
}
